package at.jku.se.fastsell.rest;

import java.io.Serializable;

import com.owlike.genson.annotation.Creator;
import com.owlike.genson.annotation.JsonProperty;

public class AuctionJSON implements Serializable {
	
	private static final long serialVersionUID = 3431195570263109507L;

	private long auctionID;
	private String title, description, highestBidder;
	private double curPrice;
	private String seller;
	private long start, end;
	private int bidCount;
	
	// ----------------------------------------------------------------------------------
	
	@Creator
	public AuctionJSON(@JsonProperty("auctionID") long auctionID, 
			@JsonProperty("title") String title,
			@JsonProperty("description") String description,
			@JsonProperty("highestBidder") String highestBidder,
			@JsonProperty("curPrice") double curPrice,
			@JsonProperty("seller") String seller,
			@JsonProperty("start") long start,
			@JsonProperty("end") long end,
			@JsonProperty("bidCount") int bidCount) {
		
		this.auctionID = auctionID;
		this.title = title;
		this.description = description;
		this.highestBidder = highestBidder;
		this.curPrice = curPrice;
		this.seller = seller;
		this.start = start;
		this.end = end;
		this.bidCount = bidCount;		
	}
	
	// ----------------------------------------------------------------------------------
		
	public long getAuctionID() {
		return auctionID;
	}
	public String getTitle() {
		return title;
	}
	public String getDescription() {
		return description;
	}
	public String getSeller() {
		return seller;
	}
	public double getCurPrice() {
		return curPrice;
	}
	public long getStart() {
		return start;
	}
	public long getEnd() {
		return end;
	}
	public int getBidCount() {
		return bidCount;
	}
	public String getHighestBidder() {
		return highestBidder;
	}


}
